package com.example.myapplication.routertest

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavHostController

@Composable
fun Page2(navController: NavHostController) {
    Column(
        modifier = Modifier
            .fillMaxWidth()
            .padding(top = 30.dp)
    ) {
        Text(
            "this is page2",
            fontSize = 30.sp,
        )
        Button(
            onClick = {
                navController.navigate(HomeRoute)
            }
        ) {
            Text(
                "back home",
            )
        }
        Button(
            onClick = {
                navController.navigate(Page1Route)
            }
        ) {
            Text(
                "go to page1",
            )
        }
    }
}